package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DishFlavorMapper {

    /**
     * 批量插入口味
     * @param dishFlavorList
     * @return
     */
   Integer add(List<DishFlavor> dishFlavorList);

    /**
     * 根据菜品id查找口味
     *
     * @param dishDtoId
     * @return
     */
    @Select("select * from dish_flavor where dish_id=#{dishDtoId}")
   List<DishFlavor> findDishFlavorById(Long dishDtoId);

    /**
     * 批量修改口味
     * @param dishFlavorList
     * @return
     */
    Integer updateDishFlavor(List<DishFlavor> dishFlavorList);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Integer DeleteByIds(Long[] ids);


}
